﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Derrick.Web
{
    public partial class ShowComet : System.Web.UI.Page
    {
        public string GetCometUrl()
        {
            string cometUrl = ConfigurationManager.AppSettings["CometUrl"];
            return ResolveUrl(cometUrl);
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string clientScript = @"<script type='text/javascript' >getResponse('" + GetCometUrl() + @"');</script>";
                ClientScript.RegisterStartupScript(GetType(), "CometScript", clientScript);
            }
        }
    }
}